home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / rdist.man < prev    next >
Encoding:
Text File  |  1989-01-06  |  13.0 KB  |  397 lines

  1.  
  2.  
  3.  
  4. RDIST                     User Commands                     RDIST
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      rdist - remote file distribution program
  10.  
  11. SSYYNNOOPPSSIISS
  12.      rrddiisstt [ -nqbRhivwy ] [ -f distfile ] [ -d var=value ]  [  -m
  13.      host ] [ name ... ]
  14.  
  15.      rrddiisstt [ -nqbRhivwy ] -c name ... [login@]host[:dest]
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.      _R_d_i_s_t is a program to maintain  identical  copies  of  files
  19.      over  multiple  hosts.  It preserves the owner, group, mode,
  20.      and mtime of files if possible and can update programs  that
  21.      are executing.  _R_d_i_s_t reads commands from _d_i_s_t_f_i_l_e to direct
  22.      the updating of files and/or directories.   If  _d_i_s_t_f_i_l_e  is
  23.      `-',  the  standard  input  is  used.   If  no  --ff option is
  24.      present, the program looks first for `distfile', then `Dist-
  25.      file' to use as the input.  If no names are specified on the
  26.      command line, _r_d_i_s_t will update all of the files and  direc-
  27.      tories listed in _d_i_s_t_f_i_l_e.  Otherwise, the argument is taken
  28.      to be the name of a file to be updated or  the  label  of  a
  29.      command  to execute. If label and file names conflict, it is
  30.      assumed to be a label.  These may be used together to update
  31.      specific files using specific commands.
  32.  
  33.      The --cc option forces _r_d_i_s_t to interpret the remaining  argu-
  34.      ments  as  a  small _d_i_s_t_f_i_l_e.  The equivalent distfile is as
  35.      follows.
  36.  
  37.           ( _n_a_m_e ... ) -> [_l_o_g_i_n@]_h_o_s_t
  38.                install   [_d_e_s_t] ;
  39.  
  40.  
  41.      Other options:
  42.  
  43.      --dd   Define _v_a_r to have _v_a_l_u_e.  The --dd  option  is  used  to
  44.           define  or  override  variable definitions in the _d_i_s_t_-
  45.           _f_i_l_e.  _V_a_l_u_e can be the empty string, one  name,  or  a
  46.           list  of  names surrounded by parentheses and separated
  47.           by tabs and/or spaces.
  48.  
  49.      --mm   Limit which machines are to  be  updated.  Multiple  --mm
  50.           arguments  can be given to limit updates to a subset of
  51.           the hosts listed the _d_i_s_t_f_i_l_e.
  52.  
  53.      --nn   Print the commands without executing them. This  option
  54.           is useful for debugging _d_i_s_t_f_i_l_e.
  55.  
  56.      --qq   Quiet mode. Files that are being modified are  normally
  57.           printed  on  standard  output. The --qq option suppresses
  58.           this.
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0               May 13, 1986                          1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RDIST                     User Commands                     RDIST
  71.  
  72.  
  73.  
  74.      --RR   Remove  extraneous  files.  If  a  directory  is  being
  75.           updated,  any  files that exist on the remote host that
  76.           do not exist in the master directory are removed.  This
  77.           is  useful  for  maintaining truely identical copies of
  78.           directories.
  79.  
  80.      --hh   Follow symbolic links. Copy  the  file  that  the  link
  81.           points to rather than the link itself.
  82.  
  83.      --ii   Ignore unresolved links.  _R_d_i_s_t will  normally  try  to
  84.           maintain  the  link structure of files being transfered
  85.           and warn the user if all the links cannot be found.
  86.  
  87.      --vv   Verify that the files are up to date on all the  hosts.
  88.           Any files that are out of date will be displayed but no
  89.           files will be changed nor any mail sent.
  90.  
  91.      --ww   Whole mode. The whole file name is appended to the des-
  92.           tination  directory  name. Normally, only the last com-
  93.           ponent of a name is used  when  renaming  files.   This
  94.           will  preserve  the  directory  structure  of the files
  95.           being copied instead of flattening the directory struc-
  96.           ture.  For  example, renaming a list of files such as (
  97.           dir1/f1  dir2/f2  )  to   dir3   would   create   files
  98.           dir3/dir1/f1  and  dir3/dir2/f2  instead of dir3/f1 and
  99.           dir3/f2.
  100.  
  101.      --yy   Younger mode. Files are normally updated if their _m_t_i_m_e
  102.           and  _s_i_z_e  (see _s_t_a_t(2)) disagree. The --yy option causes
  103.           _r_d_i_s_t not to update files that  are  younger  than  the
  104.           master  copy.  This can be used to prevent newer copies
  105.           on other hosts from being replaced.  A warning  message
  106.           is  printed  for  files which are newer than the master
  107.           copy.
  108.  
  109.      --bb   Binary comparison.  Perform  a  binary  comparison  and
  110.           update files if they differ rather than comparing dates
  111.           and sizes.
  112.  
  113.      _D_i_s_t_f_i_l_e contains a sequence of  entries  that  specify  the
  114.      files  to  be copied, the destination hosts, and what opera-
  115.      tions to perform to do the updating. Each entry has  one  of
  116.      the following formats.
  117.  
  118.           <variable name> `=' <name list>
  119.           [ label: ] <source list> `->' <destination list> <command list>
  120.           [ label: ] <source list> `::' <time_stamp file> <command list>
  121.  
  122.      The first format is used for defining variables.  The second
  123.      format  is  used for distributing files to other hosts.  The
  124.      third format is used for making lists  of  files  that  have
  125.      been  changed  since  some  given  date.   The  _s_o_u_r_c_e  _l_i_s_t
  126.  
  127.  
  128.  
  129. Sprite v1.0               May 13, 1986                          2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. RDIST                     User Commands                     RDIST
  137.  
  138.  
  139.  
  140.      specifies a list of files and/or directories  on  the  local
  141.      host  which  are to be used as the master copy for distribu-
  142.      tion.  The _d_e_s_t_i_n_a_t_i_o_n _l_i_s_t is the list of  hosts  to  which
  143.      these  files are to be copied.  Each file in the source list
  144.      is added to a list of changes if the file is out of date  on
  145.      the  host which is being updated (second format) or the file
  146.      is newer than the time stamp file (third format).
  147.  
  148.      Labels are optional. They are used to identify a command for
  149.      partial updates.
  150.  
  151.      Newlines, tabs, and blanks are only used as  separators  and
  152.      are  otherwise ignored. Comments begin with `#' and end with
  153.      a newline.
  154.  
  155.      Variables to be expanded begin  with  `$'  followed  by  one
  156.      character  or a name enclosed in curly braces (see the exam-
  157.      ples at the end).
  158.  
  159.      The source and destination lists have the following format:
  160.  
  161.           <name>
  162.      or
  163.           `(' <zero or more names separated by white-space> `)'
  164.  
  165.      The shell meta-characters `[', `]', `{', `}', `*',  and  `?'
  166.      are  recognized and expanded (on the local host only) in the
  167.      same way as _c_s_h(1).  They can be escaped with  a  backslash.
  168.      The  `~'  character  is also expanded in the same way as _c_s_h
  169.      but is expanded separately  on  the  local  and  destination
  170.      hosts.   When  the  --ww  option is used with a file name that
  171.      begins with `~', everything except  the  home  directory  is
  172.      appended  to  the destination name.  File names which do not
  173.      begin with `/' or `~' use the destination user's home direc-
  174.      tory as the root directory for the rest of the file name.
  175.  
  176.      The command list consists of zero or more  commands  of  the
  177.      following format.
  178.  
  179.           `install'  <options>    opt_dest_name `;'
  180.           `notify'   <name list>  `;'
  181.           `except'   <name list>  `;'
  182.           `except_pat'            <pattern list>`;'
  183.           `special'  <name list>  string `;'
  184.  
  185.  
  186.      The _i_n_s_t_a_l_l command is used to copy out of date files and/or
  187.      directories.  Each source file is copied to each host in the
  188.      destination list.  Directories are recursively copied in the
  189.      same  way.  _O_p_t__d_e_s_t__n_a_m_e is an optional parameter to rename
  190.      files.  If no _i_n_s_t_a_l_l command appears in the command list or
  191.      the  destination name is not specified, the source file name
  192.  
  193.  
  194.  
  195. Sprite v1.0               May 13, 1986                          3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. RDIST                     User Commands                     RDIST
  203.  
  204.  
  205.  
  206.      is used.  Directories in the path name will  be  created  if
  207.      they  do  not  exist  on  the  remote host.  To help prevent
  208.      disasters, a non-empty directory on a target host will never
  209.      be  replaced  with  a regular file or a symbolic link.  How-
  210.      ever, under the `-R' option a non-empty  directory  will  be
  211.      removed  if  the corresponding filename is completely absent
  212.      on the master host.  The _o_p_t_i_o_n_s are `-R', `-h', `-i', `-v',
  213.      `-w',  `-y', and `-b' and have the same semantics as options
  214.      on the command line except they only apply to the  files  in
  215.      the  source  list.   The  login name used on the destination
  216.      host is the same as the local host  unless  the  destination
  217.      name is of the format ``login@host".
  218.  
  219.      The _n_o_t_i_f_y command is used to mail the list of files updated
  220.      (and  any errors that may have occured) to the listed names.
  221.      If no `@' appears in  the  name,  the  destination  host  is
  222.      appended to the name (e.g., name1@host, name2@host, ...).
  223.  
  224.      The _e_x_c_e_p_t command is used to update all of the files in the
  225.      source  list eexxcceepptt for the files listed in _n_a_m_e _l_i_s_t.  This
  226.      is usually used to copy everything  in  a  directory  except
  227.      certain files.
  228.  
  229.      The _e_x_c_e_p_t__p_a_t command is like  the  _e_x_c_e_p_t  command  except
  230.      that  _p_a_t_t_e_r_n  _l_i_s_t  is  a  list of regular expressions (see
  231.      _e_d(1) for details).  If one of  the  patterns  matches  some
  232.      string  within a file name, that file will be ignored.  Note
  233.      that since `\' is a quote character, it must be  doubled  to
  234.      become  part  of  the  regular  expression.   Variables  are
  235.      expanded in _p_a_t_t_e_r_n _l_i_s_t but not shell file pattern matching
  236.      characters.  To include a `$', it must be escaped with `\'.
  237.  
  238.      The _s_p_e_c_i_a_l command is used to specify _s_h(1)  commands  that
  239.      are to be executed on the remote host after the file in _n_a_m_e
  240.      _l_i_s_t is updated or installed.  If the _n_a_m_e _l_i_s_t  is  omitted
  241.      then  the  shell  commands  will  be executed for every file
  242.      updated or installed.  The shell variable `FILE' is  set  to
  243.      the  current  filename  before  executing  the  commands  in
  244.      _s_t_r_i_n_g.  _S_t_r_i_n_g starts and ends with `"' and can cross  mul-
  245.      tiple  lines  in  _d_i_s_t_f_i_l_e.  Multiple  commands to the shell
  246.      should be separated by `;'.  Commands are  executed  in  the
  247.      user's  home  directory on the host being updated.  The _s_p_e_-
  248.      _c_i_a_l command can be used to rebuild private databases,  etc.
  249.      after a program has been updated.
  250.  
  251.      The following is a small example.
  252.  
  253.           HOSTS = ( matisse root@arpa)
  254.  
  255.           FILES = ( /bin /lib /usr/bin /usr/games
  256.                      /usr/include/{*.h,{stand,sys,vax*,pascal,machine}/*.h}
  257.                      /usr/lib /usr/man/man? /usr/ucb /usr/local/rdist )
  258.  
  259.  
  260.  
  261. Sprite v1.0               May 13, 1986                          4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. RDIST                     User Commands                     RDIST
  269.  
  270.  
  271.  
  272.           EXLIB = ( Mail.rc aliases aliases.dir aliases.pag crontab dshrc
  273.                      sendmail.cf sendmail.fc sendmail.hf sendmail.st uucp vfont )
  274.  
  275.           ${FILES} -> ${HOSTS}
  276.                      install -R ;
  277.                      except /usr/lib/${EXLIB} ;
  278.                      except /usr/games/lib ;
  279.                      special /usr/lib/sendmail "/usr/lib/sendmail -bz" ;
  280.  
  281.           srcs:
  282.           /usr/src/bin -> arpa
  283.                      except_pat ( \\.o\$ /SCCS\$ ) ;
  284.  
  285.           IMAGEN = (ips dviimp catdvi)
  286.  
  287.           imagen:
  288.           /usr/local/${IMAGEN} -> arpa
  289.                      install /usr/local/lib ;
  290.                      notify ralph ;
  291.  
  292.           ${FILES} :: stamp.cory
  293.                      notify root@cory ;
  294.  
  295.  
  296. FFIILLEESS
  297.      distfile       input command file
  298.      /tmp/rdist*    temporary file for update lists
  299.  
  300. SSEEEE AALLSSOO
  301.      sh(1), csh(1), stat(2)
  302.  
  303. DDIIAAGGNNOOSSTTIICCSS
  304.      A complaint about mismatch  of  rdist  version  numbers  may
  305.      really  stem  from  some  problem  with starting your shell,
  306.      e.g., you are in too many groups.
  307.  
  308. BBUUGGSS
  309.      Source files must reside on the local host  where  rdist  is
  310.      executed.
  311.  
  312.      There is no easy way to  have  a  special  command  executed
  313.      after all files in a directory have been updated.
  314.  
  315.      Variable expansion only works for name lists;  there  should
  316.      be a general macro facility.
  317.  
  318.      _R_d_i_s_t aborts on files which have a  negative  mtime  (before
  319.      Jan 1, 1970).
  320.  
  321.      There should be a `force' option  to  allow  replacement  of
  322.      non-empty directories by regular files or symlinks.  A means
  323.      of updating file modes and  owners  of  otherwise  identical
  324.  
  325.  
  326.  
  327. Sprite v1.0               May 13, 1986                          5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. RDIST                     User Commands                     RDIST
  335.  
  336.  
  337.  
  338.      files is also needed.
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393. Sprite v1.0               May 13, 1986                          6
  394.  
  395.  
  396.  
  397.